define(function(require) {

  var _ = require('underscore')

  function createEl(type, opts) {
    var el = document.createElement(type);
    opts = opts || {}

    el.style.position = opts.position || 'absolute';
    if (opts.zIndex) {
      el.style.zIndex = opts.zIndex;
    }
    el.style.width = (opts.width || 10) + 'px';
    el.style.height = (opts.height || 10) + 'px';
    el.style.left = (opts.x || 0) + 'px';
    el.style.top = (opts.y || 0) + 'px';

    if (type === 'canvas') {
      el.setAttribute('width', opts.width || 10)
      el.setAttribute('height', opts.height || 10)
    }

    return el;
  }

  return createEl;
})